import 'package:flutter/material.dart';

class Config {
  static const DEBUG = true;
  static const ENTERED_KEY = "entered";
  static const TOKEN_KEY = "token";
  static const USER_PHONE_KEY = "user-phone";
  static const USER_PW_KEY = "user-pw";
  static const USER_BASIC_CODE = "user-basic-code";
  static const USER_INFO = "user-info";
  static const LANGUAGE_SELECT = "language-select";
  static const LANGUAGE_SELECT_NAME = "language-select-name";
  static const REFRESH_LANGUAGE = "refreshLanguageApp";
  static const THEME_COLOR = "theme-color";
  static const LOCALE = "locale";
}

/// 网络结果数据
class ResultData {
  var data;
  bool result;
  int code;
  var headers;

  ResultData(this.data, this.result, this.code, {this.headers});
}


///颜色
class APPColors {
  static const int primaryLightValue = 0xFF0DBBFF;
  static const int primaryValue = 0xFF20A0FF;
  static const int primaryDarkValue = 0xFF3684F8;
  static const int primaryDarkerValue = 0x003666F8;

  static const int redLightValue = 0xFFF85C36;
  static const int redValue = 0xFFFF220D;

  static const int grayValue = 0xFFCCCCCC;
  static const int grayBtn = grayValue;
  static const int grayTip = 0xFFA4A8B9;
  static const int red = 0xFFFF0000;

  static const int miWhite = 0xFFF4F5F5;
  static const int white = 0xFFFFFFFF;
  static const int black = 0xFF000000;

  static const int mainTextColor = 0xFF101010;
  static const int subTextColor = 0xFF333333;
  static const int subLightTextColor = 0xFF666666;
  static const int subLighterTextColor = 0xFF999999;

  static const int mainBackgroundColor = miWhite;
  static const int lineColor = 0xFFE9E9E9;

  static const MaterialColor primarySwatch = const MaterialColor(
    primaryValue,
    const <int, Color>{
      50: const Color(primaryDarkValue),
      100: const Color(primaryDarkValue),
      200: const Color(primaryDarkValue),
      300: const Color(primaryDarkValue),
      400: const Color(primaryDarkValue),
      500: const Color(primaryValue),
      600: const Color(primaryDarkerValue),
      700: const Color(primaryDarkerValue),
      800: const Color(primaryDarkerValue),
      900: const Color(primaryDarkerValue),
    },
  );
}

///文本样式
class APPConstant {
  static const largestTextSize = 30.0;
  static const largerTextSize = 26.0;
  static const largeTextSize = 24.0;
  static const bigerTextSize = 22.0;
  static const bigTextSize = 20.0;
  static const normalTextSize = 18.0;
  static const middleTextSize = 16.0;
  static const smallTextSize = 14.0;
  static const minTextSize = 12.0;

  static const barTitle = TextStyle(
    color: Color(APPColors.black),
    fontSize: largerTextSize,
    fontWeight: FontWeight.w500,
  );
  static const cellItemTitle = TextStyle(
    color: Color(APPColors.mainTextColor),
    fontSize: normalTextSize,
    fontWeight: FontWeight.w400,
  );

  static const showCellItemTitle = TextStyle(
    color: Color(APPColors.subLightTextColor),
    fontSize: normalTextSize,
  );

  static const redTip = TextStyle(
    color: Color(APPColors.red),
    fontSize: smallTextSize,
  );
  static const grayTip = TextStyle(
    color: Color(APPColors.grayTip),
    fontSize: smallTextSize,
  );

  static const minText = TextStyle(
    color: Color(APPColors.subLighterTextColor),
    fontSize: minTextSize,
  );
  static const smallTextWhite = TextStyle(
    color: Color(APPColors.white),
    fontSize: smallTextSize,
  );

  static const smallText = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: smallTextSize,
  );

  static const smallTextBold = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: smallTextSize,
    fontWeight: FontWeight.bold,
  );

  static const smallSubLightText = TextStyle(
    color: Color(APPColors.subLighterTextColor),
    fontSize: smallTextSize,
  );

  static const smallActionLightText = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: smallTextSize,
  );

  static const smallMiLightText = TextStyle(
    color: Color(APPColors.miWhite),
    fontSize: smallTextSize,
  );

  static const smallSubText = TextStyle(
    color: Color(APPColors.subTextColor),
    fontSize: smallTextSize,
  );

  static const middleText = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: middleTextSize,
  );

  static const middleTextWhite = TextStyle(
    color: Color(APPColors.white),
    fontSize: middleTextSize,
  );

  static const middleSubText = TextStyle(
    color: Color(APPColors.subTextColor),
    fontSize: middleTextSize,
  );

  static const middleSubLightText = TextStyle(
    color: Color(APPColors.subLighterTextColor),
    fontSize: middleTextSize,
  );

  static const middleTextBold = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: middleTextSize,
    fontWeight: FontWeight.bold,
  );

  static const middleTextWhiteBold = TextStyle(
    color: Color(APPColors.white),
    fontSize: middleTextSize,
    fontWeight: FontWeight.bold,
  );

  static const middleSubTextBold = TextStyle(
    color: Color(APPColors.subTextColor),
    fontSize: middleTextSize,
    fontWeight: FontWeight.bold,
  );

  static const normalText = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: normalTextSize,
  );

  static const normalTextBold = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: normalTextSize,
    fontWeight: FontWeight.bold,
  );

  static const normalSubText = TextStyle(
    color: Color(APPColors.subTextColor),
    fontSize: normalTextSize,
  );
  static const normalSubTextBold = TextStyle(
    color: Color(APPColors.subTextColor),
    fontSize: normalTextSize,
    fontWeight: FontWeight.bold,
  );

  static const normalTextWhite = TextStyle(
    color: Color(APPColors.white),
    fontSize: normalTextSize,
  );

  static const normalTextMitWhiteBold = TextStyle(
    color: Color(APPColors.miWhite),
    fontSize: normalTextSize,
    fontWeight: FontWeight.bold,
  );

  static const normalTextActionWhiteBold = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: normalTextSize,
    fontWeight: FontWeight.bold,
  );

  static const normalTextLight = TextStyle(
    color: Color(APPColors.primaryDarkValue),
    fontSize: normalTextSize,
  );

  static const largeText = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: largeTextSize,
  );

  static const largeTextBlackBold = TextStyle(
    color: Color(APPColors.subTextColor),
    fontSize: largeTextSize,
    fontWeight: FontWeight.bold,
  );

  static const largeTextWhite = TextStyle(
    color: Color(APPColors.white),
    fontSize: largeTextSize,
  );

  static const largeTextWhiteBold = TextStyle(
    color: Color(APPColors.white),
    fontSize: largeTextSize,
    fontWeight: FontWeight.bold,
  );

  static const largeLargeTextWhite = TextStyle(
    color: Color(APPColors.white),
    fontSize: largeTextSize,
    fontWeight: FontWeight.bold,
  );

  static const largeLargeText = TextStyle(
    color: Color(APPColors.primaryValue),
    fontSize: largeTextSize,
    fontWeight: FontWeight.bold,
  );
}

class GSYICons {
  static const String FONT_FAMILY = 'wxcIconFont';

  static const String DEFAULT_USER_ICON = 'static/images/logo.png';
  static const String DEFAULT_IMAGE = 'static/images/default_img.png';
  static const String DEFAULT_REMOTE_PIC =
      'https://raw.githubusercontent.com/CarGuo/GSYGithubAppFlutter/master/static/images/logo.png';

  static const IconData HOME =
      const IconData(0xe624, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData MORE =
      const IconData(0xe674, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData SEARCH =
      const IconData(0xe61c, fontFamily: GSYICons.FONT_FAMILY);

  static const IconData MAIN_DT =
      const IconData(0xe684, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData MAIN_QS =
      const IconData(0xe818, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData MAIN_MY =
      const IconData(0xe6d0, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData MAIN_SEARCH =
      const IconData(0xe61c, fontFamily: GSYICons.FONT_FAMILY);

  static const IconData LOGIN_USER =
      const IconData(0xe666, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData LOGIN_PW =
      const IconData(0xe60e, fontFamily: GSYICons.FONT_FAMILY);

  static const IconData REPOS_ITEM_USER =
      const IconData(0xe63e, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData REPOS_ITEM_STAR =
      const IconData(0xe643, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData REPOS_ITEM_FORK =
      const IconData(0xe67e, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData REPOS_ITEM_ISSUE =
      const IconData(0xe661, fontFamily: GSYICons.FONT_FAMILY);

  static const IconData REPOS_ITEM_STARED =
      const IconData(0xe698, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData REPOS_ITEM_WATCH =
      const IconData(0xe681, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData REPOS_ITEM_WATCHED =
      const IconData(0xe629, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData REPOS_ITEM_DIR = Icons.folder;
  static const IconData REPOS_ITEM_FILE =
      const IconData(0xea77, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData REPOS_ITEM_NEXT =
      const IconData(0xe610, fontFamily: GSYICons.FONT_FAMILY);

  static const IconData USER_ITEM_COMPANY =
      const IconData(0xe63e, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData USER_ITEM_LOCATION =
      const IconData(0xe7e6, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData USER_ITEM_LINK =
      const IconData(0xe670, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData USER_NOTIFY =
      const IconData(0xe600, fontFamily: GSYICons.FONT_FAMILY);

  static const IconData ISSUE_ITEM_ISSUE =
      const IconData(0xe661, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData ISSUE_ITEM_COMMENT =
      const IconData(0xe6ba, fontFamily: GSYICons.FONT_FAMILY);
  static const IconData ISSUE_ITEM_ADD =
      const IconData(0xe662, fontFamily: GSYICons.FONT_FAMILY);

  static const IconData ISSUE_EDIT_H1 = Icons.filter_1;
  static const IconData ISSUE_EDIT_H2 = Icons.filter_2;
  static const IconData ISSUE_EDIT_H3 = Icons.filter_3;
  static const IconData ISSUE_EDIT_BOLD = Icons.format_bold;
  static const IconData ISSUE_EDIT_ITALIC = Icons.format_italic;
  static const IconData ISSUE_EDIT_QUOTE = Icons.format_quote;
  static const IconData ISSUE_EDIT_CODE = Icons.format_shapes;
  static const IconData ISSUE_EDIT_LINK = Icons.insert_link;

  static const IconData NOTIFY_ALL_READ =
      const IconData(0xe62f, fontFamily: GSYICons.FONT_FAMILY);

  static const IconData PUSH_ITEM_EDIT = Icons.mode_edit;
  static const IconData PUSH_ITEM_ADD = Icons.add_box;
  static const IconData PUSH_ITEM_MIN = Icons.indeterminate_check_box;
}

